home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 2049 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: comma.rhein.de!serpens!not-for-mail
  2. From: mlelstv@serpens.rhein.de (Michael van Elst)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: CreateProc without LoadSeg
  5. Date: 26 Jan 1996 15:53:42 +0100
  6. Organization: dis-
  7. Message-ID: <4eaptm$3r7@serpens.rhein.de>
  8. References: <4e9egr$ron@sunsystem5.informatik.tu-muenchen.de>
  9. NNTP-Posting-Host: serpens.rhein.de
  10.  
  11. fischerj@Informatik.TU-Muenchen.DE (Juergen "Rally" Fischer) writes:
  12.  
  13. >If you wish to fake a seglist, use this code:
  14.  
  15. >   ds.l 0  ;align to long
  16. >   dc.l 16 ;Segment "length" faked
  17. >   dc.l 0  ;next segment
  18. >   ....start of code...
  19.  
  20. >well. "ds.l 0". what does this mean, my assembler is crap in handling that
  21. >stuff.
  22.  
  23. Just defines a longword aligned area of length 0. Motorola assemblers understand
  24. this to align the memory pointer (== next position where code or data is written
  25. to) and then leave space for 0 longwords. A CNOP 0,4 probably does the same.
  26.  
  27. >seglist:
  28. >   dc.l 16
  29. >   dc.l 0
  30. >mycode:
  31.  
  32. This is sufficient if seglist is longword aligned.
  33.  
  34. >seglist:
  35. >   dc.l 0
  36. >   dc.l 16
  37. >   dc.l 0
  38. >mycode:
  39.  
  40. this is wrong.
  41.  
  42. >well, _BOTH_ won't work :\ this is imho a RKM bug ("third edition").
  43.  
  44. You probably forgot that CreateProc does not take a machine pointer
  45. but a BCPL pointer.
  46.  
  47. >how to get a subtask (a process) without loading a file ?
  48.  
  49. Read the autodocs. You could also use CreateNewProc that lets you 
  50. specify an entry point directly. After all time passed since the 1.3
  51. days, no ?
  52.  
  53. Regards,
  54. -- 
  55.                                 Michael van Elst
  56.  
  57. Internet: mlelstv@serpens.rhein.de
  58.                                 "A potential Snark may lurk in every tree."
  59.